#ifndef UNIXSOCKET
#define UNIXSOCKET

#define DEBUG

#define UNIXSOCKET_PATH  "/tmp/unixsocket"

#define pr_fmt(fmt) "<unix socket>: " fmt

#ifdef DEBUG

#define dbg_info(fmt, arg...)					\
    do {							\
        printf(pr_fmt(fmt), ## arg);	\
    } while (0)
    
#else

#define dbg_info(fmt, arg...)

#endif

#define err_info(fmt, arg...)					\
    do {							\
        printf(pr_fmt(fmt), ## arg);	\
    } while (0)

#define comm_info(fmt, arg...)					\
    do {							\
        printf(pr_fmt(fmt), ## arg);	\
    } while (0)


enum type {
    init = 0,
    c2c,
    c2mc,
    c2s,
};


typedef struct data {
    char id_from;
    char id_to[10];
    char type;
    char len;
    char buffer[50];
} UNIX_DATA;

struct	timeval    start1;
struct	timeval    end1;

struct	timeval    start2;
struct	timeval    end2;

struct	timeval    start3;
struct	timeval    end3;


#endif
